package top.aicats.pattern.decoratorAndObserver.observer;

import com.google.common.eventbus.EventBus;

public class QuestionEventTest {
    public static void main(String[] args) {
        EventBus eventBus = new EventBus();
        Teacher teacher1 = new Teacher("Tom");
        Teacher teacher2= new Teacher("Mic");

        eventBus.register(teacher1);
        eventBus.register(teacher2);

        Question question1 = new Question();
        question1.setUserName("小明");
        question1.setContent("装饰者和观察这是啥意思呢？");

        eventBus.post(question1);

    }
}
